Switch to a custom version dropdown#617
Merged
Merged
Conversation
Drop sphinx-multiversion, which is not able to build older docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sphinx-multiversionwas not working correctly in that it:This merge removes
sphinx-multiversionand instead adopts a custom version dropdown developed with help form ChatGPT.For now at least, the version dropdown will only be available in
mainand future releases of MPAS-tools (though we could back-port the dropdown and rebuild older versions of the docs if desired).This pull request includes several changes focused on improving the documentation build process and enhancing the versioning system for the
mpas_toolspackage. The most important changes include replacingsphinx-multiversionwith a custom versioning solution, updating the documentation build commands, and adding a version switcher to the documentation.Documentation Build Process Improvements:
.github/workflows/docs_workflow.yml: Updated the documentation build command to use a custom versioning solution and ensured that only the latest changes are applied to the documentation for the current branch.conda_package/dev-spec.txt: Removedsphinx-multiversionfrom the dependencies.conda_package/docs/Makefile: Added targets for building versioned HTML and cleaning versioned HTML builds.conda_package/docs/conf.py: Removedsphinx-multiversionrelated configurations and added a context for the current documentation version. [1] [2]Version Switcher Implementation:
conda_package/docs/_templates/layout.html: Added meta tags and a script to create a version switcher container in the documentation sidebar.conda_package/docs/shared/version-switcher.js: Implemented a JavaScript file to dynamically load and display available documentation versions.conda_package/docs/_static/style.css: Styled the version switcher dropdown menu.Documentation Content Updates:
conda_package/docs/building_docs.rst: Updated instructions for building and previewing the documentation locally.conda_package/docs/index.rst: Added new sections to the table of contents for visualization tools.conda_package/docs/making_changes.rst: Removed outdated instructions for adding new versions to the documentation.Miscellaneous Changes:
conda_package/docs/generate_versions_json.py: Added a script to generate aversions.jsonfile for the version switcher.conda_package/mpas_tools/ocean/viz/transect/__init__.py: Added a missing import forinterp_mpas_to_transect_cells.